package com.raffles.oa.dao.impl;

import java.util.List;
import java.util.Map;

import com.system.common.Page;
import com.raffles.oa.domain.ElectricInfo;
import com.raffles.oa.dao.IElectricInfoDAO;
import com.system.util.PersistUtil;
import com.raffles.oa.sql.sqlid.ElectricInfoSqlID;
/**
 * : t_raffles_electric_info
 * 
 * 
 * @author Gen
 */
public class ElectricInfoDAOImpl implements IElectricInfoDAO{

	public ElectricInfo insertElectricInfo(ElectricInfo bean){
		return PersistUtil.insert(bean, ElectricInfoSqlID.INSERT);
	}

	public boolean deleteElectricInfo(String elinGuid){
		PersistUtil.delete(elinGuid, ElectricInfoSqlID.DELETE);
		return true;
	}	

	public ElectricInfo updateElectricInfo(ElectricInfo bean){
		return PersistUtil.update(bean, ElectricInfoSqlID.UPDATE);
	}	

	public ElectricInfo loadElectricInfo(String elinGuid){
		return PersistUtil.query(new ElectricInfo().getClass(), elinGuid);
	}

	public List<ElectricInfo> queryList(Map<String,Object> param,Page page){
		page.setCount(PersistUtil.countSpecial(param, ElectricInfoSqlID.QUERY));
		return PersistUtil.querySpecial(param, ElectricInfoSqlID.QUERY, page.getFullOrderBy(), page.getOffset(), page.getLimit());
	}

}
